package com.bj58.groupbuy.action.service.impl;

import java.util.List;

import com.bj58.groupbuy.action.db.CommonDao;
import com.bj58.groupbuy.action.db.DBConfig;
import com.bj58.groupbuy.action.model.InfoSourcePlatform;
import com.bj58.groupbuy.action.service.InfoSourcePlatformService;

public class InfoSourcePlatformServiceImpl implements InfoSourcePlatformService {
	private CommonDao comDao = new CommonDao();
	
	@Override
	public List<InfoSourcePlatform> getAllPlatform() throws Exception {
		String sql = "SELECT *  FROM data_dict.m_common_source_platform  group by platform";
		return comDao.getAllColsByVo(sql, InfoSourcePlatform.class, DBConfig.db_131_data_bi.getIntType());
	}

	
	@Override
	public List<InfoSourcePlatform> getSourceList(String platform)
			throws Exception {
		String sql = "SELECT *   FROM data_dict.m_common_source_platform where platform='" + platform+"' group by source_name";
		return comDao.getAllColsByVo(sql, InfoSourcePlatform.class, DBConfig.db_131_data_bi.getIntType());
	}

}
